package vip.specimen.system.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import vip.specimen.system.datasource.entity.SystemResourceEntity;
import vip.specimen.system.datasource.entity.SystemResourceSuffixEntity;

import java.util.List;
import java.util.UUID;

/**
 * *@Author: 余浪人
 * *@Date：2021/3/11 14:17
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Repository
public interface SystemResourceRepository extends JpaRepository<SystemResourceEntity, UUID> {
    SystemResourceEntity findSystemResourceEntityByFileKeyOrderByCreateTimeDesc(String key);

    Page<SystemResourceEntity> findAllBySuffixEntityInOrderByCreateTimeDesc(List<SystemResourceSuffixEntity> suffixEntities, Pageable pageable);
}
